package hcn.protocol.brandnew.provider;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;

/**
 * pacs推送检查报告信息
 *
 * @author neoLin - 2023/08/07 10:26
 **/
@Data
@XmlRootElement(name = "MsgBody")
@XmlAccessorType(XmlAccessType.FIELD)
public class PostPacsReportInfoRequest {

    /**
     * 报告信息
     */
    @XmlElement(name = "Report")
    private Report report;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Report {

        /**
         * 就诊机构编码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 申请单号
         */
        @XmlElement(name = "RequestId")
        private String requestId;
        /**
         * 患者姓名
         */
        @XmlElement(name = "PatientName")
        private String patientName;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 证件号码
         */
        @XmlElement(name = "IdCard")
        private String idCard;
        /**
         * 检查报告时间
         */
        @XmlElement(name = "RequestDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date requestDateTime;
        /**
         * 检查类型代码
         */
        @XmlElement(name = "ExamTypeCode")
        private String examTypeCode;
        /**
         * 检查类型名称
         */
        @XmlElement(name = "ExamTypeName")
        private String examTypeName;
        /**
         * 检查报告机构
         */
        @XmlElement(name = "ReportOrganization")
        private String reportOrganization;
        /**
         * 报告科室名称
         */
        @XmlElement(name = "ReportDeptName")
        private String reportDeptName;
        /**
         * 报告单编号
         */
        @XmlElement(name = "ReportId")
        private String reportId;
        /**
         * 报告单名称
         */
        @XmlElement(name = "ReportName")
        private String reportName;



    }

}
